package demo.android.ipc;

import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.LinearLayout;

import com.hss01248.facedetect.activity.CollectActivity;
import com.hss01248.facedetect.utils.ToastUtil;

public class OptionActivity extends AppCompatActivity implements View.OnClickListener {

    private LinearLayout ll_free;
    private LinearLayout ll_special;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


        supportRequestWindowFeature(Window.FEATURE_NO_TITLE); // 去掉标题栏 有效
        setContentView(R.layout.activity_option);
        ll_free = (LinearLayout) findViewById(R.id.oa_ll_free);
        ll_special = (LinearLayout) findViewById(R.id.oa_ll_special);
        ll_free.setOnClickListener(this);
        ll_special.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        Intent intent;
        switch (v.getId()) {
            case R.id.oa_ll_free:
                intent = new Intent(OptionActivity.this, CollectActivity.class);
                intent.putExtra("task","free");
                startActivity(intent);
                break;
            case R.id.oa_ll_special:

                startActivity(new Intent(OptionActivity.this, SpecialCredentialsActivity.class));

                break;
        }
    }
}
